<!-- ThemeSelect 主题换肤组件 -->
<template>
  <el-dropdown
    v-bind="$attrs"
    trigger="click"
    class="theme"
    @command="handleSetTheme"
  >
    <!-- 展示图标 -->
    <div>
      <el-tooltip :content="$t('msg.navBar.themeChange')" effect="light">
        <svg-icon id="guide-theme" icon="change-theme"></svg-icon>
      </el-tooltip>
    </div>
    <template #dropdown>
      <el-dropdown-menu>
        <el-dropdown-item command="color">
          {{ $t('msg.theme.themeColorChange') }}
        </el-dropdown-item>
      </el-dropdown-menu>
    </template>
  </el-dropdown>
  <!-- 展示弹出层 -->
  <div>
    <color-select v-model="selectColorVisble"></color-select>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import ColorSelect from './components/ColorSelect'

// dialog 控制
const selectColorVisble = ref(false)

// 点击换肤图表
const handleSetTheme = command => {
  selectColorVisble.value = true
}

</script>
<style lang="scss" scoped>
</style>
